<template>
  <div class="father">
    父组件
    <p>接受的值：{{msg}}</p>
    <MySon :son_arr="arr" @getData="getData"></MySon>
  </div>
</template>

<script>
import MySon from './components/MySon.vue'
export default {
  components: { MySon },
  data () {
    return {
      arr: ["父组件的数组"],
      obj: {
        name: "父组件里的对象"
      },
      num: 0,
      string: '父组件里的字符串',
      msg: ""
    }
  },
  mounted () {

  },
  methods: {
    getData (val) {
      this.msg = val
    }
  }

}
</script>

<style lang="less" scoped>
.father {
  height: 300px;
  width: 300px;
  background-color: pink;
}
</style>
